﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;

namespace d1Common.Interface
{
    public interface IDo4AService
    {
        IToken GetToken0(string _tokenValue);
        IToken GetToken1(string _tokenValue);
        IToken GetToken2(string _tokenValue);
        IToken GetToken3(string _tokenValue);
        IToken GetToken4(string _tokenValue);
        IDictionary<string, IRolePermission> GetRolePermissions(string _roleID);
        void WriteAuditLog(string _TypeId, string _TypeName, string _userId, string _userName, string _desc);
        IDoPermissionOpt getDoPermissionOpt(string _permissionId, int _optId);

        //获取user1信息
        IDictionary<string, string> GetUser1Detail(string user1Id);
        Task<IDictionary<string, string>> GetUser1DetailAsync(string user1Id);

        //获取user2信息
        IDictionary<string, string> GetUser2Detail(string user2Id);
        Task<IDictionary<string, string>> GetUser2DetailAsync(string user2Id);
        Task<IDictionary<string, string>> PostUser2Async(string id, string code, string mobilePhone, string email, string name, string passWord);

        //获取user3信息
        IDictionary<string, string> GetUser3Detail(string user3Id);
        Task<IDictionary<string, string>> GetUser3DetailAsync(string user3Id);
        Task<IDictionary<string, string>> PostUser3Async(string id, string code, string mobilePhone, string email, string name, string passWord);

        //获取user4信息
        IDictionary<string, string> GetUser4Detail(string user4Id);
        Task<IDictionary<string, string>> GetUser4DetailAsync(string user4Id);
        Task<IDictionary<string, string>> PostUser4Async(string id, string code, string mobilePhone, string email, string name, string passWord);

        //获取部门信息
        IDictionary<string, string> GetDeptDetail(string deptId);
        Task<IDictionary<string, string>> GetDeptDetailAsync(string deptId);

        /// <summary>
        /// 通过部门Id获取用户列表
        /// </summary>
        /// <param name="deptId"></param>
        /// <param name="isLookChildDept"></param>
        /// <returns></returns>
        Task<List<string>> GetUser1IdsByDept(string deptId, bool isLookChildDept);

        /// <summary>
        /// 获取用户第三方认证信息
        /// </summary>
        /// <param name="user2Id">用户Id</param>
        /// <param name="appType">第三方登录的类型（WeiXin 微信、QQ 腾讯qq、SinaWeiBo 微博）</param>
        /// <param name="openId">微信用户openId</param>
        /// <returns></returns>
        IDictionary<string, string> GetThirdPartUserDetail(string user2Id, string appType, string openId);

        /// <summary>
        /// 获取用户第三方认证信息
        /// </summary>
        /// <param name="user2Id">用户Id</param>
        /// <param name="appType">第三方登录的类型（WeiXin 微信、QQ 腾讯qq、SinaWeiBo 微博）</param>
        /// <param name="openId">微信用户openId</param>
        /// <returns></returns>
        Task<IDictionary<string, string>> GetThirdPartUserDetailAsync(string user2Id, string appType, string openId);
    }
}